package myjava.enumerated;

public class Root2 {

   public static void main(String[] args) {

      for (Season s : Season.values()) {
         System.out.println(s + " - temperatura media : " + s.getTemperature());
         System.out.println("What do you think about it? " + s.getHowMuchYouLikeIt());
      }
   }
}

enum Season {

   // I use here what is called CONSTANT SPECIFIC CLASS BODY
   WINTER(2) {

      @Override
      public String getHowMuchYouLikeIt() {
         return "I just hate it!";
      }
   },
   SPRING(15),
   SUMMER(30) {

      @Override
      public String getHowMuchYouLikeIt() {
         return "I like it a lot";
      }
   },
   FALL(9);

   Season(int temp) {
      this.averageTemperature = temp;
   }
   private int averageTemperature;

   public int getTemperature() {
      return this.averageTemperature;
   }

   public String getHowMuchYouLikeIt() {
      return "It's allright!";
   }
}